/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2023 All Rights Reserved.
 */
package com.example.spider.config;

import org.shoulder.core.context.AppInfo;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @author liuyanming
 * @version : MetricsConfiguration.java, v 0.1 2023年04月06日 16:22 liuyanming Exp $
 */
@Configuration
public class MetricsConfiguration {

    @Qualifier("spiderMetrics")
    @Bean("spiderMetrics")
    public SpiderMetrics spiderMetrics() {
        return new SpiderMetrics(AppInfo.appId() + "_spider_metrics_", "spider");
    }


    @Qualifier("handlerMetrics")
    @Bean("handlerMetrics")
    public SpiderMetrics handlerMetrics() {
        return new SpiderMetrics(AppInfo.appId() + "_spider_metrics_", "handler");
    }

}